package com.ricervcvcer.goods.client;


import com.ricervcvcer.goods.config.FeignConfig;
import com.ricervcvcer.goods.entity.TbBrand;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "brand-server", configuration = FeignConfig.class)
public interface BrandClient {

    @GetMapping("brand/id/{id}")
    ResponseEntity<TbBrand> getBrandById(@PathVariable("id") Long id);

    @PostMapping("brand/ids")
    ResponseEntity<List<TbBrand>> getBrandsByIds(@RequestBody List<Long> ids);

}
